using System;
using System.Collections;

namespace Sedna.Core.Controller.Configurations
{
	/// <summary>
	/// an instance of this class holds a state of an DataGrid.
	/// (this is an alternative to storing the flatten grid state in the ExecutionContext)
	/// </summary>
	public class DataGridState
	{
		private bool sortAsc = true;
		private string sortExpression;
		private int pageSize;
		private int currentPageIndex;
		private int virtualItemCount;
		private ICollection dataSource;
		private ICollection checkedLines;
		private string lineSelection;


		#region properties

		public string LineSelection
		{
			get { return lineSelection; }
			set { lineSelection = value; }
		}

		public bool SortAsc
		{
			get { return sortAsc; }
			set { sortAsc = value; }
		}

		public string SortExpression
		{
			get { return sortExpression; }
			set { sortExpression = value; }
		}

		public int PageSize
		{
			get { return pageSize; }
			set { pageSize = value; }
		}

		public int CurrentPageIndex
		{
			get { return currentPageIndex; }
			set { currentPageIndex = value; }
		}

		public int VirtualItemCount
		{
			get { return virtualItemCount; }
			set { virtualItemCount = value; }
		}

		public ICollection DataSource
		{
			get { return dataSource; }
			set { dataSource = value; }
		}

		public ICollection CheckedLines
		{
			get { return checkedLines; }
			set { checkedLines = value; }
		}

		#endregion properties


	}
}
